<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
</body>
<script>
    const Time=new Date()
    // 月
    const moth=(Time.getMonth()+1).toString().padStart(2,'0')
    console.log(moth);
    // 日
    const date=Time.getDate().toString().padStart(2,'0')
    console.log(date);
    // 时
    const horse=Time.getHours().toString().padStart(2,'0')
    console.log(horse);
    // 分
    const minutes=Time.getMinutes().toString().padStart(2,'0')
    console.log(minutes);
    // 秒
    const seconds=Time.getSeconds().toString().padStart(2,'0')
    console.log(seconds);
    // 毫秒
    const milliseconds=Time.getMilliseconds().toString().padStart(3,'0')
    console.log(milliseconds);
</script>
</html>